﻿<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<% application.setAttribute("path",request.getContextPath()); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>奋青网-致力于创造无悔的青春</title>
<link href="css/Main.css" rel="stylesheet" type="text/css" />
<link href="css/Index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/Jquery-1-5-2.js"></script>
<script type="text/javascript" src="js/Main.js"></script>
<script type="text/javascript" src="js/Index.js"></script>
<script type="text/javascript">
<!--
	function getType(){
		var type = document.form1.type ;
		var action = document.form1.action ;
		action = action.value ;
		var form = document.form1 ;
		if(type.value==2){
			form.action="${applicationScope.path }/Active";
		}else if(type.value==1){
			form.action="${applicationScope.path }/ArticleList";
		}else if(type.value==0){
			form.action="${applicationScope.path }/ClubList";
		}
	}
-->
</script>
</head>
<body>
<div id="Top">
  <div class="Top_all"> <a href="#"><img src="images/LOGO.jpg"/></a>
    <ul id="Top_Nav">
      <li><a href="${applicationScope.path }/Index">首页</a></li>
      <li><a href="${applicationScope.path }/ArticleList">领域</a></li>
      <li><a href="#">发现</a></li>
    </ul>
    <ul id="Second_Menu">
      	<li><a href="${applicationScope.path }/ClubList">发现社团</a><li>
      	<li><a href="#">对味奋青</a><li>
      	<li><a href="${applicationScope.path }/Active">有趣活动</a><li>
      </ul>
    <div id="Search">
      <div class="Search_l"></div>
      <form name="form1" method="post" action="" onsubmit="getType();">
      	<input type="hidden" name="action" value="search" />
        <input type="text" id="Search_Box" name="content" value="搜索社团、文章、活动..."/>
        <img src="images/search_btn.jpg" id="Search_Btn"/>
        <input type="hidden" value="0" id="Search_What" name="type"/>  <!--传送搜索类型参数-->
      </form>
    </div>
    <div id="Search_Option">
    	<p class="Search_Option_Hover"><img src="images/search_hover0.jpg"/>包含<span></span>的社团</p>
    	<p><img src="images/search_hover1.jpg"/>包含<span></span>的帖子</p>
    	<p><img src="images/search_hover2.jpg"/>包含<span></span>的活动</p>
    </div>
    <div id="User_Top">
    <c:choose>
    	<c:when test="${not empty sessionScope.user}">
    	<c:forEach items="${requestScope.login}" var="login">
    		<img src="${login.uphoto}"/><a href="#">${login.uname}</a>
        	<ul id="User_Info_Box">
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}"><img src="images/home.jpg"/>个人主页</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=private"><img src="images/sms.jpg"/>私信</a></li>
	        	<li><a href="${applicationScope.path }/Pro?uid=${login.uid}&lx=edit"><img src="images/control.jpg"/>设置</a></li>
	        	<li><a href="${applicationScope.path }/Logout.jsp"><img src="images/logout.jpg"/>注销</a></li>
        	</ul>
        </c:forEach>
    	</c:when>
   	 	<c:otherwise>
    		<a href="${applicationScope.path }/Entrance.jsp">您还未登录</a>
    	</c:otherwise>
    </c:choose>
    </div>
    <img src="images/help.jpg" id="Help_Btn" title="帮助中心"/> </div>
</div>
<!--头部结束-->
<ul id="Banner">
  <ul id="Banner_List">
    <li style="border:1px solid #09F;"></li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
  <li class="Banner_Img" style="z-index:4;"><a href="#"><img src="images/banner_1.jpg"/></a></li>
  <li class="Banner_Img"><a href="#"><img src="images/banner_2.jpg"/></a></li>
  <li class="Banner_Img"><a href="#"><img src="images/banner_3.jpg"/></a></li>
  <li class="Banner_Img"><a href="#"><img src="images/banner_4.jpg"/></a></li>
</ul>
<div class="Banner_Bottom"></div>
<!--Banner结束-->
<div class="Index_Big"> 
  <!--左边部分-->
  <div class="Index_Div">
    <div class="Index_Title_l_1"></div>
    <div class="Index_Main_Left">
      <div id="Club_List">
      	<!--此标签为一栏动态-->
      	<c:forEach items="${requestScope.cor}" var="cor" begin="0" end="2">
  <script>
      	$.ajax({
			type:"POST",
			url:"Index?action=get&id="+${cor.cid},
			dataType:"text",
			success:casuccess 
		});
		function casuccess(a){
			var ps1 = document.getElementById('ACK'+${cor.cid });
			ps1.innerHTML = a;
		}
  </script>
      	<div class="Club_List_All">
            <div class="Club_List_Info">
            <div class="Club_List_Img"><span class="Club_Text_Bg">${cor.cname }<p class="Club_Grade"><span title="成员数量">${cor.number }</span><span title="活跃度">${cor.cmark }</span></p></span><a href="${applicationScope.path }/Club?cid=${cor.cid }"><img src="${cor.cphono }" /></a></div>
                <div class="Club_List_Text">
                    <p>${cor.content }<a href="${applicationScope.path }/Club?cid=${cor.cid }">查看主页>></a></p>
                    <span>领域：<a href="#">${cor.ftype }</a></span><br />
                    <span>标签：<a href="#">${cor.ctag }</a></span>
                </div>
            </div>
            <ul id = "ACK${cor.cid }" class="Club_User_Info">
            	
            </ul>
        </div>
        </c:forEach>
      	
      	
      </div>
      <div class="Index_Title_l_2"></div>
      <div class="Index_Article">
      	<ul id="Article_Style">
        	<li class="Article_Style_Current">文学创作</li>
        	<li>爱心公益</li>
        	<li>艺术</li>
        	<li>学术创新</li>
        	<li>体育健身</li>
        	<li>传媒</li>
        	<li>兴趣爱好</li>
        </ul>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem1}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem1}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card1}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card1}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem2}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem2}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card2}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card2}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
         <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem3}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem3}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card3}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card3}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem4}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem4}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card4}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card4}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem5}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem5}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card5}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card5}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem6}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem6}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card6}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	   <c:if test="${empty requestScope.card6}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      	<!--此标签为一栏领域文章-->
        <div class="Article_Main" style="display:none;">
            <div class="Article_Title">
            	<span>最新问题</span><span>最新文章</span>
            </div>
            <ul class="Article_List" style="padding-right:10px;">
            <c:forEach items="${requestScope.problem7}" var="pro" end="4">
              <li><a href="${applicationScope.path }/Post?pid=${pro.pid}">${pro.ptitle}</a></li>
            </c:forEach>
            <c:if test="${empty requestScope.problem7}">
            	<li><a>暂无最新消息</a></li>
            </c:if>
            </ul>
            <ul class="Article_List">
              <c:forEach items="${requestScope.card7}" var="card" end="4">
          			<li><a href="${applicationScope.path }/QApage?pid=${card.cdid}">${card.cdtitle}</a></li>
        	  </c:forEach>
        	  <c:if test="${empty requestScope.card7}">
        	  	<li><a>暂无最新消息</a></li>
        	  </c:if>
            </ul>
        </div>
      </div>
    </div>
  </div>
  <!--右边部分-->
  <div class="Index_Div" style="width:291px;">
    <div class="Index_Title_r_1"></div>
    <div class="Index_Main_Right">
    	<div id="Top_List">
        	<ul>
        	<c:forEach items="${requestScope.person}" var="per" end="9"  varStatus="statu">
                <li class="Top_Leave"><span>${statu.count}</span><a href="${applicationScope.path }/Pro?uid=${per.uid}"><img src="${per.uphoto}"/></a><a href="${applicationScope.path }/Pro?uid=${per.uid}">${per.uname}</a><span class="User_Club">(${per.cname})</span><p><span class="User_Digg" title="获得赞同数">${per.cdagree}</span><span class="User_Article" title="发表文章数">${per.cdid}</span></p></li>
            </c:forEach>
            </ul>
        </div>
        <div class="Index_Title_r_2"></div>
        <div class="Hot_Active">
           <c:forEach items="${requestScope.hd}" var="hd" end="4">
    		    <a href="${applicationScope.path }/Active"><img src="images/active_pic.jpg"/><span>${hd.aname}</span><p>地点：${hd.awhere}</p></a>
        	</c:forEach>
    		<c:if test="${empty requestScope.hd}">
        		<a href="#">暂无最新活动</a>
        	</c:if>
        </div>
    </div>
  </div>
  <div class="Index_Bottom"></div>
</div>
<div class="Bottom">
<p><a href="#"><img src="images/LOGO_gray.jpg" align="left"/></a>
<a href="#">奋青首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">社团中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">交流圈子</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">活动中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">帮助中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#">使用反馈</a>&nbsp;&nbsp;|&nbsp;&nbsp;联系我们：<a href="mailto:scdzwyxst@gmail.com">scdzwyxst@gmail.com</a>&nbsp;&nbsp;<br />
  CopyRight&copy;&nbsp;2012&nbsp;MayDay  All Rights Reserved</p>
</div>
</body>
</html>
